﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Xml;
using System.Configuration;
using System.Data.SqlClient;
using System.Data;

namespace FantanstPlatform.Decision.CaseXmlService
{
    class Program
    {
        
        static void Main(string[] args)
        {
            CaseCountFactory caseFactory = new CaseCountFactory();
            XmlFactory xmlFactory = new XmlFactory();

            List<CaseCount> stationThisYearCase = caseFactory.getThisYearCase();
            xmlFactory.CreatMultiBarChartXml(stationThisYearCase,"本年案件图表");

            List<CaseCount> stationThisMonthCase = caseFactory.getThisMonthCase();
            xmlFactory.CreatMultiBarChartXml(stationThisMonthCase, "本月案件图表");

            List<CaseCount> stationLastMonthCase = caseFactory.getLastMonthCase();
            xmlFactory.CreatMultiBarChartXml(stationLastMonthCase, "上月案件图表");

            List<CaseCount> stationThisWeekCase = caseFactory.getThisWeekCase();
            xmlFactory.CreatMultiBarChartXml(stationThisWeekCase, "本周案件图表");

            List<CaseCount> stationLastWeekCase = caseFactory.getLastWeekrCase();
            xmlFactory.CreatMultiBarChartXml(stationLastWeekCase, "上周案件图表");

            List<ContrastCaseCount> timeTwoCase = caseFactory.getTwoCase();
            xmlFactory.CreatMultiTendencyChartXml(timeTwoCase, "本年案件对比趋势图", "01");

            List<ContrastCaseCount> timeFiveCase = caseFactory.getFiveCase();
            xmlFactory.CreatMultiTendencyChartXml(timeFiveCase, "本年五类案件趋势图", "02");
        }
       
    }
    public class CaseCount 
    {
        public string Station { get; set; }
        public int TotalCount { get; set; }
        public int CriminalCount { get; set; }
        public int SecurityCount { get; set; }
    }
    public class ContrastCaseCount
    {
        public string Time { get; set; }
        public string CaseCount1 { get; set; }
        public string CaseCount2 { get; set; }
        public string CaseCount3 { get; set; }
        public string CaseCount4 { get; set; }
        public string CaseCount5 { get; set; }
    }
}
